<?php
include("inc/conn.inc");
$hove=1;
$u_rs=mysql_query("select * from jm_pinpai where id='".$_GET['id']."'");
$u_row=mysql_fetch_array($u_rs);

$m_rs=mysql_query("select id,m_type,m_user,m_name,m_cname,m_sex,c_type,c_mode,m_ts_tel,m_pic from member where id='$u_row[member_id]'");
$m_row=mysql_fetch_array($m_rs);

if($m_row['m_type']==6){
   $m_url="http://$m_row[m_user].sandib2b.cn/";
   $m_url2="http://$m_row[m_user].sandib2b.cn/contact.htm";
}else{
   $m_url="http://www.sandib2b.cn/cn/template/$m_row[m_user]/";
   $m_url2="http://www.sandib2b.cn/cn/template/$m_row[m_user]/contact.html";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$u_row[j_title]?>，三帝加盟网-致力打造品牌加盟、连锁加盟、代理加盟首选平台。</title>
<meta name="description" content="<?=$u_row[j_title]?>，三帝加盟网为千万中小投资、创业者提供选择好项目，创业加盟、投资创业、连锁加盟、招商加盟、小本创业、代理加盟等，并为各行业代理加盟创造财富价值的品牌商机网。" />
<meta name="keywords" content="<?=$u_row[j_title]?>，中国加盟网、致富网、加盟网、加盟代理、加盟店、连锁店、连锁加盟、排行榜、加盟店排行榜、婴幼加盟、服装加盟、饰品加盟、餐饮加盟、品牌女装、开店找项目、创业、创业商机网、商机网、小本创业、致富网、加盟项目" />
<LINK href="/style/url_body.css" type=text/css rel=stylesheet>
<LINK href="/style/url_head.css" type=text/css rel=stylesheet>
<LINK href="/style/url_system.css" type=text/css rel=stylesheet>
<LINK href="/style/url_foot.css" type=text/css rel=stylesheet>
<script language="javascript" src="http://www.sandib2b.cn/js/city.js" type="text/javascript" charset="gb2312"></script>
</head>
<body>
<?php include("top.php");?>
<DIV id=main style="padding-top: 2px;padding-bottom: 2px;padding-left: 6px;">
<div class="title1">您当位置:  <a href="/">首页</a> > <?=$u_row[j_title]?></div>
<div class="onl"></div>
</div>
<?php 
/*
<!-------------------------------------------------->
<!---     下面的</div>是top.php文件第一个DIV结束   --->
*/
?>
</div>
<?php /*--------------------------------------------------*/?>
<div>
<?php include("jiameng/temp2/".$u_row[m_user]."/index.htm");?>
</div>

<div class="messagesend sideyellow1">
<div class="title5"><span>您可以给供应商留言</span>
<div class="onl"></div>
</div>
<table width="100%" border="0" cellspacing="5">
  <tr>
    <td colspan="2">
	<?php 
	$rs=mysql_query("select * from m_message where is_jm=1 and m_type=4 and m_web='http://jm.sandib2b.cn/jiameng/temp2/".$u_row[m_user]."/".$u_row[id].".html' order by id desc limit 10");
	while($row=mysql_fetch_array($rs)){
	?>
	<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#E7E7E7">
      <tr>
        <td width="67%"><?=$row['m_name']?></td>
        <td width="33%">留言时间：<?=$row['add_time']?></td>
      </tr>
      <tr>
        <td colspan="2" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="4%" align="center"><img src="/images/wenukd.gif" width="18" height="18" /></td>
            <td width="96%"><?=$row[m_content]?></td>
          </tr>
        </table></td>
        </tr>
    </table>
    <?php }?>  
	  </td>
    </tr>
</table>

<div class="n-1"><?php if($m_row[m_pic]){?><img src="http://img.sandib2b.cn/<?=$m_row[m_pic]?>" border="0" <?=imgstr("http://img.sandib2b.cn/$m_row[m_pic]","100","100")?>/><?php }else{?><img src="/images/photo.gif" width="100" height="100"><?php }?><span class="b"><?=$m_row[m_name]?>(<?=$m_row[m_sex]?>)</span>
<span class="b"><br />
<br />
<a href="<?=$m_url2?>" target="_blank"><img src="/images/contact.gif" alt="联系方式" width="120" height="29" border="0" /></a></span></div>
<div class="n-2">
  <table width="98%" border="0" cellpadding="2" cellspacing="0" bgcolor="#F2F2F2">
<form name="form1" method="get" action="/sent.php" onSubmit="return check()">
<input name="inquire_subject" type="hidden" value="<?=$u_row[j_title]?>">
<input type="hidden" name="to_id" value="<?=$m_row[id]?>">
    <tr>
      <td width="15%" height="25" align="right">留言内容：</td>
      <td width="85%"><textarea name="inquire_content" cols="60" rows="5" style="width:520px;" id="inquire_content"></textarea></td>
    </tr>
    <tr>
      <td height="25" align="right">联系人：</td>
      <td><input name="inquire_name" type="text" size="20" maxlength="20" id="inquire_name" /> <font color="#FF0000">*</font></td>
    </tr>
    <tr>
      <td height="25" align="right">联系电话：&nbsp;</td>
      <td><input name="inquire_tel" type="text" size="20" maxlength="20" id="inquire_tel" /> <font color="#FF0000">*</font></td>
    </tr>
    <tr>
      <td height="25" align="right">邮箱：</td>
      <td><input name="inquire_email" type="text" size="30" maxlength="200" id="inquire_email"/></td>
    </tr>
    <tr>
      <td height="25" align="right">QQ/MSN：</td>
      <td><input name="inquire_qq" type="text" size="25" maxlength="200" id="inquire_qq" /></td>
    </tr>
    <tr>
      <td height="25" align="right">联系地址：</td>
      <td><input name="inquire_addr" type="text" size="40" maxlength="250" id="inquire_addr" /> <font color="#FF0000">*</font></td>
    </tr>
    <tr>
      <td height="25" align="right">验证码：</td><input type="hidden" name="inquire_act" value="tijiao" />
      <td><input name="c_code" type="text" class="input" maxlength="6" style="width:60px;" id="c_code" />
    &nbsp;&nbsp;<img src="<?php echo SITE_URL;?>inc/code.php" name="img" width="90" height="30" align="absmiddle" id="img">&nbsp;&nbsp;<a href="#" name="can not see" id="test">刷新</a></td>
    </tr>
    <tr>
      <td height="25" align="right">&nbsp;</td>
      <td><input type="submit" value=" 提 交 " /></td>
    </tr>
	</form>
  </table>
</div>
<div class="onl"></div>
</div>
<?php include("foot.php");?>

</body>
</html>
<script language="javascript">
function $(id){
return document.getElementById(id);
}
function check(){

if($("inquire_content").value==""){
alert("留言内容不能为空");
$("inquire_content").focus();
return false;
}
if($("inquire_name").value==""){
alert("请留下您的姓名");
$("inquire_name").focus();
return false;
}
if($("inquire_tel").value==""){
alert("请留下您的电话或手机");
$("inquire_tel").focus();
return false;
}

if($("inquire_addr").value==""){
alert("请留下您的联系地址");
$("inquire_addr").focus();
return false;
}

if($("c_code").value==""){
alert("验证码不能为空");
$("c_code").focus();
return false;
}
}

function test(img){
    var src=img.getAttribute("src");
    src=src+"?new="+Math.random(0,10);
    img.setAttribute("src",src);
}
function prepare(){
    var nav=document.getElementById("test");
    var name=nav.getAttribute("name");
    var str="can not see";
    if(name==str){
        nav.onclick=function(){
            var img=document.getElementById("img");
            test(img);
            return false;
        }
    }
}
window.onload=prepare;
</script>
